package 图书管理项目.oprations;

import 图书管理项目.Dao.BookDao;

import java.util.Scanner;

public class ReturnOperation implements IOperation{
    @Override
    public void work() {
        System.out.println("归还书籍");
        System.out.println("请输入要归还的书籍bookId:");
        Scanner scanner = new Scanner(System.in);
        int bookId=scanner.nextInt();

        BookDao bookDao=new BookDao();
        boolean ret = bookDao.returnBook(bookId);

        if (ret) {
            System.out.println("归还成功！");
        }else {
            System.out.println("归还失败！");
        }

    }
}
